package com.ruoyi.market.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName market_customer
 */
@TableName(value ="market_customer")
@Data
public class MarketCustomer implements Serializable {
    /**
     * （客户id）主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 客户名称
     */
    private String name;

    /**
     * 性别(男/女)
     */
    private String sex;

    /**
     * 联系电话
     */
    private String telephone;

    /**
     * 所属公司
     */
    private String company;

    /**
     * 所属区域(市) 外键
     */
    private Integer sysCityId;

    /**
     * 状态(0:不可用；1:可用)
     */
    private String status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人id(外键user)
     */
    private Integer sysCreateUserId;

    /**
     * 分配时间
     */
    private Date distracTime;

    /**
     * 客服人员id（外键）
     */
    private Integer sysServiceUserId;

    /**
     * 描述
     */
    private String descs;

    /**
     * 家庭住址
     */
    private String address;

    /**
     * 所属城市
     */
    @TableField(exist = false)
    private String cityname;
    /**
     *创建人名称
     */
    @TableField(exist = false)
    private String createby;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MarketCustomer other = (MarketCustomer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
            && (this.getCompany() == null ? other.getCompany() == null : this.getCompany().equals(other.getCompany()))
            && (this.getSysCityId() == null ? other.getSysCityId() == null : this.getSysCityId().equals(other.getSysCityId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getSysCreateUserId() == null ? other.getSysCreateUserId() == null : this.getSysCreateUserId().equals(other.getSysCreateUserId()))
            && (this.getDistracTime() == null ? other.getDistracTime() == null : this.getDistracTime().equals(other.getDistracTime()))
            && (this.getSysServiceUserId() == null ? other.getSysServiceUserId() == null : this.getSysServiceUserId().equals(other.getSysServiceUserId()))
            && (this.getDescs() == null ? other.getDescs() == null : this.getDescs().equals(other.getDescs()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
        result = prime * result + ((getCompany() == null) ? 0 : getCompany().hashCode());
        result = prime * result + ((getSysCityId() == null) ? 0 : getSysCityId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getSysCreateUserId() == null) ? 0 : getSysCreateUserId().hashCode());
        result = prime * result + ((getDistracTime() == null) ? 0 : getDistracTime().hashCode());
        result = prime * result + ((getSysServiceUserId() == null) ? 0 : getSysServiceUserId().hashCode());
        result = prime * result + ((getDescs() == null) ? 0 : getDescs().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", sex=").append(sex);
        sb.append(", telephone=").append(telephone);
        sb.append(", company=").append(company);
        sb.append(", sysCityId=").append(sysCityId);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", sysCreateUserId=").append(sysCreateUserId);
        sb.append(", distracTime=").append(distracTime);
        sb.append(", sysServiceUserId=").append(sysServiceUserId);
        sb.append(", desc=").append(descs);
        sb.append(", address=").append(address);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}